package cn.hy.dataSync.config;

import cn.hy.dataSync.statistics.container.communicator.AbstractContainerCommunicator;
import org.apache.commons.lang.Validate;


public abstract class AbstractContainer {

    protected JobConfig jobConfig;

    protected AbstractContainerCommunicator containerCommunicator;

    public AbstractContainer(JobConfig jobConfig) {
        Validate.notNull(jobConfig, "jobConfig 不能为空");
        this.jobConfig = jobConfig;
    }

    public AbstractContainerCommunicator getContainerCommunicator() {
        return containerCommunicator;
    }

    public void setContainerCommunicator(AbstractContainerCommunicator containerCommunicator) {
        this.containerCommunicator = containerCommunicator;
    }

    /**
     * 容器启动
     */
    public abstract void start();
}
